var filmDatas = [
	{"id":"1177887","title":"宝马M3 德国进口 KLT 幻彩闪耀橙 贴膜套餐 (含工时费)","price":"7500","img_src":"image/img1.jpg"},
	{"id":"1177888","title":"奥迪Q3 德国进口 KLT 星光钻石魅蓝红 贴膜套餐 (含工时费)","price":"6500","img_src":"image/img2.jpg"},
	{"id":"1177889","title":"阿斯顿马丁Vanquish 德国进口 KLT 电光太空银 贴膜套餐 (含工时费)","price":"8500","img_src":"image/img3.jpg"},
	{"id":"1177890","title":"雷克萨斯RCF 德国进口 KLT 流光孔雀蓝 贴膜套餐 (含工时费)","price":"6800","img_src":"image/img4.jpg"},
	{"id":"1177891","title":"保时捷718 德国进口 KLT 水晶水泥灰 贴膜套餐 (含工时费)","price":"6800","img_src":"image/img5.jpg"},
	{"id":"1177892","title":"本田雅阁 德国进口 KLT 电光棕灰 贴膜套餐 (含工时费)","price":"5500","img_src":"image/img6.jpg"},
	{"id":"1177893","title":"大众高尔夫7 德国进口 KLT 水晶玉米黄 贴膜套餐 (含工时费)","price":"5500","img_src":"image/img7.jpg"},
	{"id":"1177894","title":"奔驰smart 比利时进口isee 2 电光浅粉/樱花粉 贴膜套餐 (含工时费)","price":"4500","img_src":"image/img8.jpg"}
	
	]



// 2.实例Vue对象
	new Vue({
	    el: '.g-box',
	    data: {
	    	filmData: filmDatas
	    },
	    methods: {
	    	// APP端接口
	    	getApp:function(key,value){
	    		var appData = {"key":key,"value":value};
	    		// alert("key值是:"+key+",vlaue值是:"+value);
	    		//判断访问终端
					var browser={
					    versions:function(){
					        var u = navigator.userAgent, app = navigator.appVersion;
					        return {
					            trident: u.indexOf('Trident') > -1, //IE内核
					            presto: u.indexOf('Presto') > -1, //opera内核
					            webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
					            gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,//火狐内核
					            mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
					            ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
					            android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, //android终端
					            iPhone: u.indexOf('iPhone') > -1 , //是否为iPhone或者QQHD浏览器
					            iPad: u.indexOf('iPad') > -1, //是否iPad
					            webApp: u.indexOf('Safari') == -1, //是否web应该程序，没有头部与底部
					            weixin: u.indexOf('MicroMessenger') > -1, //是否微信 （2015-01-22新增）
					            qq: u.match(/\sQQ/i) == " qq" //是否QQ
					        };
					    }(),
					    language:(navigator.browserLanguage || navigator.language).toLowerCase()
					}

				// 判断是安卓还是苹果
				if(browser.versions.android){
					getAppData(JSON.stringify(appData));
				}else{
					var iver = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
					iver = parseInt(iver[1],10);
					// IOS 8以上用webkit方法,IOS 8以下用UIWebview方法
			        if(iver >= 8){
			            // AppModel是OC所注入的对象
    					window.webkit.messageHandlers.AppModel.postMessage({body:appData});
			        }else{
    					getAppData(appData);
			        }
				}
	    	}
	    }
	})